package com.cuitrip.storage.prefrence;

/**
 *设置使用Preferences
 */
public class UserPreferences extends BasePreferences {

    private static final String PREFERENCE_NAME = "user";

    private static UserPreferences instance;

    /**
     * @param keyClass 保存preferenceKey的类，key必须是public static的
     */
    private UserPreferences(Class keyClass) {
        super(keyClass);
    }

    public static UserPreferences getInstance() {
        if (instance == null) {
            instance = new UserPreferences(UserKeys.class);
        }
        return instance;
    }

    @Override
    protected String getPreferenceName() {
        return PREFERENCE_NAME;
    }

    public class UserKeys {
        //api环境
        public static final String LOGIN_PHONE_NUM = "phone_num";
    }
}
